@import 'icon-code.scss';
@import "animate";
@import "dropzone";

:root {
  --editor-height: 60vh;
}

// Loading Animation

@keyframes anim-rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.spinner {
  display: inline-block;
  height: 1em;
  line-height: 1;
  margin: .5em;
  animation: anim-rotate 2s infinite linear;
  color: #333;
  text-shadow: 0 0 .25em rgba(255, 255, 255, .3);
}

.spinner--steps {
  animation: anim-rotate 1s infinite steps(8);
}

.spinner--steps2 {
  animation: anim-rotate 1s infinite steps(12);
}

// Modal Window Styles...
.modal-mask {
  position: fixed;
  z-index: 9998;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, .5);
  transition: opacity .3s ease;
}

.modal.media-modal.modal-mask {
  display: inherit;
}

.modal-container {
  width: auto;
  margin: 3em;
  padding: 1.5em;
  background-color: #fff;
  border-radius: 2px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .33);
  transition: all .3s ease;
}

.modal-lg {
  width: auto !important;
}

.modal-header h4 {
  margin-top: 0;
}

.modal-body {
  margin: 20px 0;
  max-height: calc(100vh - 265px);
  overflow-y: auto;
}

.modal-enter {
  opacity: 0;
}

.modal-leave-active {
  opacity: 0;
}

.modal-enter .modal-container,
.modal-leave-active .modal-container {
  -webkit-transform: scale(1.1);
  transform: scale(1.1);
}

/* always present */
.expand-transition {
  transition: all 1s ease;
  overflow: hidden;
}

/* .expand-enter defines the starting state for entering */
/* .expand-leave defines the ending state for leaving */
.expand-enter, .expand-leave {
  height: 0;
  padding: 0 10px;
  opacity: 0;
}

// Media Manager Styles...
#media-manager-file-picker {

  .modal-footer {
      .item-count {
        flex: 1 0 0;
        text-align: left;
      }
      .buttons {
        flex: 4 0 0;
      }
  }

  .media-manager-alternative-content {
    display: flex;
    justify-content: center;
    align-items: center;
    height: var(--editor-height);
    flex-direction: column;

    h4{
      margin-top: 0;
    }

    &.loading{
      height: var(--editor-height) + 6.5vh;
    }
  }

  .btn-toolbar {
    label {
      margin-bottom: 0px;
    }
  }

  .media-manager-file-browser {
    color: #5e5e5e;
    height: calc(var(--editor-height) + 3.2rem);
    margin-bottom: 0;
    margin-top: 0;
    min-height: 200px;
    padding: 0.5rem;
    width: auto;

    .breadcrumb {
      background-color: transparent;
      margin-bottom: 0.25rem;
      padding: 8px 15px 8px 6px;
      li {
        a {
          color: #a9a9a9;
          &.active {
            color: #7c7c7c;
          }
        }
      }

      li + li::before {
        color: #ccc;
        content: "> ";
        padding: 0 5px;
      }

    }

    &.modal-dialog {
      margin-top: 2rem;
    }

    .word-wrappable {
      word-wrap: break-word;
    }


    .media-manager-file-picker-list {
      height: var(--editor-height);
      overflow-y: scroll;

      .table {
        tbody {
          tr {
            &.bg-primary {
              td {
                color: #fff;
                a {
                  color: #fff;
                }

              }
            }

            &:last-child {
              td {
                padding-bottom: 7px;
              }
            }

            td {
              transition: background-color 0.15s ease-in-out 0.05s;
              padding-left: 7px;
              border-top: 1px solid #f0f0f0;
              a {
                color: #5e5e5e;
                cursor: pointer;
                margin-left: 0.5em;
              }
            }

            th {
              &:first-child {
                padding-left: 7px;
              }
            }
          }
        }
      }

    }

    .media-manager-file-picker-sidebar {
      height: var(--editor-height);
      overflow-y: auto;
      border-left: 1px solid rgb(240, 240, 240);
    }

    .media-manager-file-picker-preview-table {
      margin-top: 1em;

      td {
        border-width: 0;

        &.description {
          text-transform: uppercase;
          font-weight: 500;
        }

        &.file-value {
          word-break: break-all;
        }
      }
    }
  }
}

// Notifications
.modal-errors {
  ul {
    list-style: outside none none;
    margin: 0;
    padding: 0;
    li {
      color: #f6675d;
    }
  }
}

.alert {
  padding-left: 30px;
  font-size: 13px;
}

.alert span {
  cursor: pointer;
}

.alert:not(.alert-dismissible) {
  padding-right: 30px;
}

.alert.alert-dismissable {
  padding-right: 44px;
}

.alert-inverse {
  background-color: #333333;
  border-color: transparent;
  color: #ffffff;
}

.alert-inverse hr {
  border-top-color: rgba(0, 0, 0, 0);
}

.alert-inverse .alert-link {
  color: #e6e6e6;
}

.growl-animated.alert-inverse {
  box-shadow: 0 0 5px rgba(51, 51, 51, 0.5);
}

.growl-animated.alert-info {
  box-shadow: 0 0 5px rgba(33, 150, 243, 0.5);
}

.growl-animated.alert-success {
  box-shadow: 0 0 5px rgba(76, 175, 80, 0.5);
}

.growl-animated.alert-warning {
  box-shadow: 0 0 5px rgba(255, 193, 7, 0.5);
}

.growl-animated.alert-danger {
  box-shadow: 0 0 5px rgba(244, 67, 54, 0.5);
}